
import java.io.IOException;

public class Main {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		java.io.BufferedReader r = new java.io.BufferedReader(
				new java.io.InputStreamReader(System.in));
		int num = Integer.parseInt(r.readLine().trim());
		for (int m = 0; m < num; m++) {
			r.readLine();
			long sum = 0;
			long count = Long.parseLong(r.readLine().trim());
			for (int i = 0; i < count; i++) {
				String s = r.readLine().trim();
				sum = (sum + Long.parseLong(s)) % count;
			}
			if (sum % count == 0) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
}

